<!--
 * @Author: your name
 * @Date: 2022-01-10 17:26:23
 * @LastEditTime: 2022-01-10 20:33:22
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \sdyoa\src\views\Login\index.vue
-->
<template>
    <div class="login_box">
       <el-row class="login">
    <div class="avatar">
      <img src="@/assets/001.png" alt="">
    </div>
    <!--
      已经把表单关联了 info 数据
    -->
    <el-form :model="info" :rules="loginRules" ref="login" label-width="100px" class="login-ruleForm">
      <el-form-item label="用户名" prop="username">
        <!-- 关联着 info 内的 username -->
        <el-input v-model="info.username"></el-input>
      </el-form-item>
      <el-form-item label="密码" prop="password">
        <!-- 关联着 info 内的 password -->
        <el-input v-model="info.password"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="submitHandler">立即登录</el-button>
        <el-button @click="resetHandler">重置</el-button>
      </el-form-item>
    </el-form>
  </el-row>
    </div>
</template>

<script>
    export default {
        data(){
            return{}
        }
    }
</script>

<style lang="less" scoped>
.login_box {
  width: 100%;
  height: 100%;
  background-color: skyblue;
  display: flex;
  justify-content: center;
  align-items: center;
}
.avatar {
      width: 150px;
      height: 150px;
      border: 3px solid pink;
      background-color: #fff;
      position: absolute;
      left: 50%;
      top: 0;
      transform: translateX(-50%) translateY(-50%);
      border-radius: 50%;
      overflow: hidden;
        img {
            width: 150px;
            height: 240px;
        }
}
.login {
    width: 500px;
    border: 3px solid pink;
    padding: 20px;
}
</style>